
package com.csh.szhm.custorm;

import android.content.Context;
import android.support.v4.view.ViewPager;
import android.util.AttributeSet;
import android.view.MotionEvent;

/**
 * android4.0的缩放bug，结合PhotoView拖动可能崩溃，只要复写viewpager里面的派发时间就可以了。
 * @author dennis
 *
 */
public class PhotoViewPager extends ViewPager
{

	public PhotoViewPager(Context context)
	{
		super(context);
	}

	public PhotoViewPager(Context context, AttributeSet attrs)
	{
		super(context, attrs);
	}

	@Override
	public boolean onInterceptTouchEvent(MotionEvent ev)
	{
		try
		{
			return super.onInterceptTouchEvent(ev);
		}
		catch (IllegalArgumentException e)
		{
		}
		catch (ArrayIndexOutOfBoundsException e)
		{

		}
		return false;
	}
}